db_init_check(){
	if [ -d /opt/ShenTong/odbs/OSRDB -a `ls -A /opt/ShenTong/odbs/OSRDB | wc -l` -gt 0 ]; then
		echo "The OSRDB have created. Skip init."
	else
		echo "Start to init OSRDB."
		/opt/ShenTong/bin/createdb.sh OSRDB /opt/ShenTong utf8
		echo "Init OSRDB have finished."
	fi
}


server_start(){
	/opt/ShenTong/admin/oscaragentd start
	/opt/ShenTong/admin/oscardb_OSRDBd start
}

db_init_check
server_start

tail -f /opt/ShenTong/log/OSRDB/*
